# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=evolution-ews
pkgver=3.54.1
pkgrel=0
pkgdesc="MS Exchange integration through Exchange Web Services"
url="https://wiki.gnome.org/Apps/Evolution/EWS"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	cmake
	evolution-data-server-dev
	evolution-dev
	gettext-dev
	glib-dev
	gtk-doc
	libmspack-dev
	libsoup3-dev
	samurai
	uhttpmock-dev
	"
options="!check" # fail in docker due to port restrictions
subpackages="$pkgname-lang"
source="https://download.gnome.org/sources/evolution-ews/${pkgver%.*}/evolution-ews-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DENABLE_TESTS=OFF
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
ce5aa1e653305d991b633fcf22efd15c6604af0dd3efa940a0673665d5768a713e25cf1c9409250360262f4a1c16b2d9c742e04393869082463321d62b9725c2  evolution-ews-3.54.1.tar.xz
"
